package middleware

import (
	"fmt"

	"github.com/gin-gonic/gin"
)

func PrintRequestInfo() gin.HandlerFunc {

	return func(c *gin.Context) {
		path := c.FullPath()
		fmt.Println("path:", path)
		fmt.Println("pathUri:", c.Request.RequestURI)
		fmt.Println("method:", c.Request.Method)

		c.Next()

		fmt.Println("-----------------------")
		fmt.Println("状态码", c.Writer.Status())
	}
}
